Optimal. Leaf size=71 \[ -\frac {A}{a^2 x}-\frac {(A b-a B) x}{2 a^2 \left (a+b x^2\right )}-\frac {(3 A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{5/2} \sqrt {b}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {467, 464, 211}
\begin {gather*} -\frac {(3 A b-a B) \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{5/2} \sqrt {b}}-\frac {x (A b-a B)}{2 a^2 \left (a+b x^2\right )}-\frac {A}{a^2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 464
Rule 467
Rubi steps
\begin {align*} \int \frac {A+B x^2}{x^2 \left (a+b x^2\right )^2} \, dx &=-\frac {(A b-a B) x}{2 a^2 \left (a+b x^2\right )}-\frac {1}{2} \int \frac {-\frac {2 A}{a}+\frac {(A b-a B) x^2}{a^2}}{x^2 \left (a+b x^2\right )} \, dx\\ &=-\frac {A}{a^2 x}-\frac {(A b-a B) x}{2 a^2 \left (a+b x^2\right )}-\frac {(3 A b-a B) \int \frac {1}{a+b x^2} \, dx}{2 a^2}\\ &=-\frac {A}{a^2 x}-\frac {(A b-a B) x}{2 a^2 \left (a+b x^2\right )}-\frac {(3 A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{5/2} \sqrt {b}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 70, normalized size = 0.99 \begin {gather*} -\frac {A}{a^2 x}+\frac {(-A b+a B) x}{2 a^2 \left (a+b x^2\right )}+\frac {(-3 A b+a B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{5/2} \sqrt {b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 62, normalized size = 0.87
method | result | size |
default | \(-\frac {\frac {\left (\frac {A b}{2}-\frac {B a}{2}\right ) x}{b \,x^{2}+a}+\frac {\left (3 A b -B a \right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}}}{a^{2}}-\frac {A}{a^{2} x}\) | \(62\) |
risch | \(\frac {-\frac {\left (3 A b -B a \right ) x^{2}}{2 a^{2}}-\frac {A}{a}}{x \left (b \,x^{2}+a \right )}-\frac {3 \ln \left (-\sqrt {-a b}\, x -a \right ) A b}{4 \sqrt {-a b}\, a^{2}}+\frac {\ln \left (-\sqrt {-a b}\, x -a \right ) B}{4 \sqrt {-a b}\, a}+\frac {3 \ln \left (-\sqrt {-a b}\, x +a \right ) A b}{4 \sqrt {-a b}\, a^{2}}-\frac {\ln \left (-\sqrt {-a b}\, x +a \right ) B}{4 \sqrt {-a b}\, a}\) | \(141\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 63, normalized size = 0.89 \begin {gather*} \frac {{\left (B a - 3 \, A b\right )} x^{2} - 2 \, A a}{2 \, {\left (a^{2} b x^{3} + a^{3} x\right )}} + \frac {{\left (B a - 3 \, A b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.18, size = 210, normalized size = 2.96 \begin {gather*} \left [-\frac {4 \, A a^{2} b - 2 \, {\left (B a^{2} b - 3 \, A a b^{2}\right )} x^{2} - {\left ({\left (B a b - 3 \, A b^{2}\right )} x^{3} + {\left (B a^{2} - 3 \, A a b\right )} x\right )} \sqrt {-a b} \log \left (\frac {b x^{2} + 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right )}{4 \, {\left (a^{3} b^{2} x^{3} + a^{4} b x\right )}}, -\frac {2 \, A a^{2} b - {\left (B a^{2} b - 3 \, A a b^{2}\right )} x^{2} - {\left ({\left (B a b - 3 \, A b^{2}\right )} x^{3} + {\left (B a^{2} - 3 \, A a b\right )} x\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right )}{2 \, {\left (a^{3} b^{2} x^{3} + a^{4} b x\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.34, size = 114, normalized size = 1.61 \begin {gather*} - \frac {\sqrt {- \frac {1}{a^{5} b}} \left (- 3 A b + B a\right ) \log {\left (- a^{3} \sqrt {- \frac {1}{a^{5} b}} + x \right )}}{4} + \frac {\sqrt {- \frac {1}{a^{5} b}} \left (- 3 A b + B a\right ) \log {\left (a^{3} \sqrt {- \frac {1}{a^{5} b}} + x \right )}}{4} + \frac {- 2 A a + x^{2} \left (- 3 A b + B a\right )}{2 a^{3} x + 2 a^{2} b x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.23, size = 62, normalized size = 0.87 \begin {gather*} \frac {{\left (B a - 3 \, A b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a^{2}} + \frac {B a x^{2} - 3 \, A b x^{2} - 2 \, A a}{2 \, {\left (b x^{3} + a x\right )} a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 63, normalized size = 0.89 \begin {gather*} -\frac {\frac {A}{a}+\frac {x^2\,\left (3\,A\,b-B\,a\right )}{2\,a^2}}{b\,x^3+a\,x}-\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (3\,A\,b-B\,a\right )}{2\,a^{5/2}\,\sqrt {b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________